package com.ag.lzw.dao;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.ag.dao.TbProposeDAO;

@Repository("lzwTbProposeDAO")
public class LzwTbProposeDAO extends TbProposeDAO {
	@Autowired
	public void init(SessionFactory sessionFactory) {
		super.setSessionFactory(sessionFactory);
	}
	
	public List findEventLeader(String eid){
		String hql = "From TbPropose as tp left join fetch tp.tbEvent left join fetch tp.tbUserByPViceCommander where tp.tbEvent.EId = '"+eid+"'";
		return this.getHibernateTemplate().find(hql);
	}
}
